-
Notifications
You must be signed in to change notification settings - Fork 716
[css-borders-4] Define border/shadow rendering for corner-shape
#12175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specific comments scattered in. Generally, tho, I can't actually follow the algorithm and am confused by several details, and it handwaves several operations that might be obvious when you're "in the code", but aren't clear from my perspective as a relative outsider.
css-borders-4/Overview.bs
Outdated
1. If |s| is equal or less than -1, return <code>0, -|w|</code>. | ||
|
||
Note: Because of the above clamping, when the shape is more convex than a ''corner-shape/round'' or more concave than a ''corner-shape-scoop'', | ||
the inner curve cannot would appear to have a "belly" towards the middle, as it cannot remain constant while maintaining the same curvature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"cannot would" needs fixing, but I'm not 100% certain what it's trying to say.
css-borders-4/Overview.bs
Outdated
To compute the inner path of a corner: | ||
|
||
1. Let |adjustedX|, |adjustedY| be the result of the [=adjusted untrimmed inner top-left corner starting point=] steps, | ||
modified to consider the corresponding 'border-width' and 'corner-shape' values at the start and end of a path`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the modification?
css-borders-4/Overview.bs
Outdated
|
||
1. Let |adjustedX|, |adjustedY| be the result of the [=adjusted untrimmed inner top-left corner starting point=] steps, | ||
modified to consider the corresponding 'border-width' and 'corner-shape' values at the start and end of a path`. | ||
1. Create a path based on the [=canonical superellipse formula=], with the outer corner as the center, starting from |adjustedX| and ending at |adjustedY|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand what this is saying. I'm particularly confused by what the "starting from... ending from..." part means; it doesn't match what I thought those variables were for. They're x and y coordinates of a point; how do you "start" and "end" at them individually?
css-borders-4/Overview.bs
Outdated
modified to consider the corresponding 'border-width' and 'corner-shape' values at the start and end of a path`. | ||
1. Create a path based on the [=canonical superellipse formula=], with the outer corner as the center, starting from |adjustedX| and ending at |adjustedY|. | ||
User agents MAY create an approximation of this path rather than try to follow the formula precisely, for performance reasons. | ||
1. Trim the resulting path so that it starts at a point that has a 'border-width' distance from the outer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also not sure what this is actually telling me to do. :(
css-borders-4/Overview.bs
Outdated
|
||
This is illustrated in the following chart: | ||
<figure> | ||
<img src="images/corner-shape-border.svg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use some details of where the points/etc calculated by the above algorithms are.
Is the hull calculated in the above algorithms in some way?
Fair! I redid the whole thing with more explanations and a rigorous algorithm. PTAL! |
Based on this resolution
Added detailed algorithms, explanation, and a chart.
Closes #11610
Closes #11767